<div class="tabbable tabs-left">
              <ul class="nav nav-tabs">
              	<li><h5><?php echo $this->translate('标签组信息'); ?></h5></li>
                <li class="active"><a data-toggle="tab" href="#tag_group_a"><?php echo $this->translate('基本信息'); ?></a></li>
				  <?php if($this->group_info) { ?>
				  <li><a data-toggle="tab" href="#tag_group_b"><?php echo $this->translate('组内标签'); ?></a></li>
				  <?php } ?>
              </ul>
              <form class="form-horizontal" name="tag_group_form" id="tag_group_form" method="post" action="">
              <input type="hidden" name="tag_group_id" id="tag_group_id" value="<?php if($this->group_info) echo $this->group_info['tag_group_id']; else echo ''; ?>" />
				  <input type="hidden" name="tag_group_save_type" id="tag_group_save_type" value="" />
			  <div class="tab-content">
    			<div style="height:30px;border-bottom:4px solid #DFDFDF;">
        			<div class="pull-left" style="font-size:16px;line-height:30px;"><strong><?php if($this->group_info) echo $this->translate('编辑'); else echo $this->translate('新加'); ?><?php echo $this->translate('标签组'); ?></strong></div>
        			<div class="pull-right">
                	<a href="<?php echo $this->url('tag/default',array('action'=>'tagGroup')); ?>" class="btn btn-small"><i class="icon-arrow-left"></i> <?php echo $this->translate('返回标签组列表'); ?></a>&nbsp;
                	<a href="<?php echo $this->serverUrl(true); ?>" class="btn btn-small btn-warning"><i class="icon-repeat icon-white"></i> <?php echo $this->translate('刷新'); ?></a>&nbsp;
                    <?php if($this->group_info) { ?>
                    <a href="javascript:;" onclick="return group_del_js(<?php echo $this->group_info['tag_group_id']; ?>);" class="btn btn-small btn-danger"><i class="icon-remove icon-white"></i> <?php echo $this->translate('删除标签组'); ?></a>&nbsp;
                    <?php } ?>
					<button type="submit" onclick="$('#tag_group_save_type').val('save_return_edit');" class="btn btn-small btn-primary"><i class="icon-ok icon-white"></i> <?php echo $this->translate('保存标签组信息并继续编辑'); ?></button>&nbsp;
                	<button type="submit" onclick="$('#tag_group_save_type').val('');" class="btn btn-small btn-primary"><i class="icon-ok icon-white"></i> <?php echo $this->translate('保存标签组信息'); ?></button>&nbsp;
                	<a href="<?php echo $this->myviewalias()->dbshopHelpUrl('goods_tag_group_set'); ?>" target="_blank" class="btn btn-small btn-info"><i class="icon-info-sign icon-white"></i> <?php echo $this->translate('查看帮助说明'); ?></a>
                	</div>
        		</div>
                <div id="tag_group_a" class="tab-pane active">
                	<div class="well admin_add_header_well"><?php echo $this->translate('基本信息'); ?></div>
                	<div class="well admin_add_well">
						<div class="message_one">
						</div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('标签组名称'); ?><span class="must_add_value">*</span>：</label>
           					<div class="controls">
              					<input type="text" id="tag_group_name"  name="tag_group_name" class="span6" value="<?php echo ($this->group_info ? $this->escapeHtml($this->group_info['tag_group_name']) : ''); ?>">
            				</div>                        
                        </div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('标签组排序'); ?>：</label>
           					<div class="controls">
              					<input type="text" id="tag_group_sort"  name="tag_group_sort" class="span1" value="<?php echo ($this->group_info ? $this->group_info['tag_group_sort'] : '255'); ?>">
            				</div>                        
                        </div> 
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('标签组标记'); ?>：</label>
           					<div class="controls">
              					<input type="text" id="tag_group_mark"  name="tag_group_mark" class="span2" value="<?php echo ($this->group_info ? $this->escapeHtml($this->group_info['tag_group_mark']) : ''); ?>">
                                <i class="cus-help shop_admin_help_note" data-content="<?php echo $this->translate('标签组标记 只用于后台显示，用来区分名字相同的标签组，如 材质(家具)、材质（服装），其中的 家具 和 服装 就是标签组标记。'); ?>"></i>
            				</div>                        
                        </div>
						<div class="control-group">
							<label for="input01" class="control-label"><?php echo $this->translate('用于(高级)商品规格'); ?>：</label>
							<div class="controls">
								<label class="checkbox inline">
									<input type="checkbox" name="is_goods_spec" value="1" <?php if(isset($this->group_info['is_goods_spec']) and $this->group_info['is_goods_spec'] == 1) echo 'checked'; ?>><?php echo $this->translate('开启'); ?>
								</label>
							</div>
						</div>
					</div>
                </div>
				  <div id="tag_group_b" class="tab-pane">
					  <div class="well admin_add_header_well"><?php echo $this->translate('组内标签'); ?></div>
					  <div class="well admin_add_well" style="padding:2px;">
						  <?php if($this->tag_list) { ?>
						  <table class="table table-hover">
							  <thead style="background: #CCC;">
							  <tr>
								  <th width="7%">
									  ID
								  </th>
								  <th width="15%"><?php echo $this->translate('排序'); ?></th>
								  <th><?php echo $this->translate('标签名称'); ?></th>
							  </tr>
							  </thead>
							  <?php foreach ($this->tag_list as $tag_val) { ?>
							<tr>
								<td><?php echo $tag_val['tag_id']; ?></td>
								<td><input type="text" name="tag_sort[<?php echo $tag_val['tag_id']; ?>]" value="<?php echo $tag_val['tag_sort']; ?>" class="span8"></td>
								<td><?php echo $this->escapeHtml($tag_val['tag_name']); ?></td>
							</tr>
							  <?php } ?>
						  </table>
						  <?php } else { ?>
							<p style="margin-top: 6px;margin-bottom: 6px;font-size: 15px;"><?php echo $this->translate('该组还没有标签，可以'); ?> <a href="<?php echo $this->url('tag/default',array('controller'=>'tag')); ?>"><?php echo $this->translate('点击这里去添加标签'); ?></a></p>
						  <?php } ?>
					  </div>
				  </div>

             </div>
              </form>
</div>
<script>
//标签分组保存验证
$(document).ready(function() {
	$("#tag_group_form").validate({
		rules: {
			tag_group_name: {
				required: true,
				maxlength:30
			},
			tag_group_sort: {
				number: true,
				min:1,
				max:255
			}
		},
		messages: {
			tag_group_name: {
				required: "<?php echo $this->translate('请输入标签组名称！'); ?>",
				maxlength:"<?php echo $this->translate('标签组名称最长为30个汉字！'); ?>"
			},
			tag_group_sort: {
				number: "<?php echo $this->translate('标签组排序必须为数字'); ?>",
				min:"<?php echo $this->translate('标签组排序最小为1'); ?>",
				max:"<?php echo $this->translate('标签组排序最大为255'); ?>"
			}
		}
	});
});
//标签组删除js
function group_del_js(group_id) {
	if(window.confirm('<?php echo $this->translate('您确实要删除该标签组吗？'); ?>')) {
	$.post("<?php echo $this->url('tag/default',array('action'=>'delTagGroup')); ?>",{tag_group_id:group_id},
	function(data){
		if(data != 'false') {
			window.location.href='<?php echo $this->url('tag/default',array('action'=>'tagGroup')); ?>';
			return true;
		} else {
			alert('<?php echo $this->translate('标签组删除失败，标签组下存在标签！'); ?>');
		}
	});
	}
	return false;
}

<?php if ($this->success_msg != '') { ?>
show_message('.message_one','<?php echo date("Y-m-d H:i:s"); ?>','<?php echo $this->success_msg; ?>','alert-success');
<?php } ?>
</script>